export const code = `<script setup>
    import { code } from './code/case1.js';
    import * as echarts from 'echarts';
    import { onMounted } from 'vue';
    onMounted(() => {
        // 基于准备好的dom，初始化echarts实例
        const dom = document.getElementById('bar-case-1');
        const myChart = echarts.init(dom, 'dark', { renderer: 'svg' });

        // 绘制图表
        myChart.setOption({
            title: { text: '最简单的柱状图' },
            tooltip: {},
            xAxis: {
                type: 'category',
                data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
            },
            yAxis: { type: 'value' },
            series: [
                {
                    name: '销量',
                    type: 'bar',
                    data: [5, 20, 36, 10, 10, 20],
                },
            ],
        });
    });
</script>`;
